From e7b0534d286d64c4a69f433407cae350df599676 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 10 Jan 2006 21:17:15 +0000 Subject: [PATCH] Fake timestamp when making track from wpt in cvt filter. --- gpsbabel/cvttypes.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gpsbabel/cvttypes.c b/gpsbabel/cvttypes.c index b17cf7395..a61cec634 100644 --- a/gpsbabel/cvttypes.c +++ b/gpsbabel/cvttypes.c @@ -27,6 +27,7 @@ static char *action; static route_head *my_trk_head; +time_t tmstart; static arglist_t cvttype_skeleton_args[] = { @@ -35,6 +36,7 @@ arglist_t cvttype_skeleton_args[] = { {0, 0, 0, 0, 0} }; + static void cvttype_skeleton_init(const char *args) { @@ -54,6 +56,10 @@ cvttype_skeleton_process(void) // if action == to trk waypt_del(wpt); + /* If no timestamp, fake one. */ + if (wpt->creation_time <= 0) { + wpt->creation_time = ++tmstart; + } route_add_wpt(my_trk_head, wpt); // if action == to rte // waypt_del(wpt); -- 2.30.2